#ifndef EVENTCOLLECTOR_H
#define EVENTCOLLECTOR_H

#include <QtGui>
#include "uti_ObjectWithEvents.h"

// creo un collettore di eventi tipo imagelab

class CEventCollector: public QObject, public CObjWithEvents{

    Q_OBJECT


public:

    CEventCollector():
    CObjWithEvents(NULL,"EventCollector"){
        // divento il default collector di eventi
        SetObjWithEventDefaultParent();
    }

    // quando muoio io, disabilito eventi
    ~CEventCollector(){

        SetCaptureEventState(false);
    }


    virtual bool CaptureEvent (unsigned int iEvent, unsigned int wParam, unsigned int lParam, CObjWithEvents* pSender){

        // catturo un po' di eventi qua e la
        switch(iEvent){
        case EVENT_DEBUG:
            break;

        case EVENT_ERROR:{
            // creo la finestra about
                QMessageBox::information(NULL, tr("Error"),QString((char*)lParam));
            break;
        }

        }

        return  false;
    }




};


#endif // EVENTCOLLECTOR_H
